<include file='public/_meta'>

<div class="page-container">
    <div class="Huialert Huialert-success"><i class="Hui-iconfont">&#xe6a6;</i>
        <p class="c-primary">
            操作提示
        </p>
        <ul>
          <li>车型切换</li>

          <li>暂只支持控制赛卡车辆(博鹭途)</li>


        </ul>
    </div>
    
    
        <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
            <span class=""> <a class="btn btn-primary radius" onclick="rentType('{$cars}',81)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 景逸 S50</a></span> 
            <span class="ml-50"> <a class="btn btn-secondary radius" onclick="rentType('{$cars}',82)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 江淮 iEV6E</a></span>  
            <span class="ml-50"> <a class="btn btn-success radius" onclick="rentType('{$cars}',83)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 御捷 EX331 </a></span>
            <span class="ml-50"> <a class="btn btn-secondary radius" onclick="rentType('{$cars}',84)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 北汽 EC200  </a></span> 
            <span class="ml-50"> <a class="btn btn-primary radius" onclick="rentType('{$cars}',89)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> EX360  </a></span> 
        </div>

        <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        
            <span class="ml-50"> <a class="btn btn-secondary radius" onclick="rentType('{$cars}',85)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 北汽 EU260J  </a></span> 
            <span class="ml-50"> <a class="btn btn-success radius" onclick="rentType('{$cars}',86)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 众泰知豆 D2  </a></span>

            <span class="ml-50"> <a class="btn btn-primary radius" onclick="rentType('{$cars}',87)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 众泰知豆 301C   </a></span> 
            <span class="ml-50"> <a class="btn btn-danger radius" onclick="rentType('{$cars}',88)" href="javascript:;"><i class="Hui-iconfont">&#xe69e;</i> 菱智 M5EV  </a></span> 

        </div>
</div>

<!--_footer 作为公共模版分离出去-->
<include file='public/_footer'>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">

function rentType(car_unique_id,type) {
    layer.confirm('确认要切换车型吗？',function(index){
        // console.log('ss')
        $.ajax({
            type: 'GET',
            url: "{:url('index/operate/switch')}",
            data:{
                'car_unique_id':car_unique_id,
                'type':type
            },
            dataType: 'json',
            success: function(data){
                if(data.result == 0){               
                    layer.msg(data['msg'],{icon:1,time:1000});
                }else{
                    layer.msg(data['msg']);
                }  
            },
            error:function(data) {
                console.log(data.msg);
            },
        });     
    });
    
}

</script> 
<!--/请在上方写此页面业务相关的脚本-->